import request from '@/utils/request'

// 查询产品硬件详情列表
export function listProductHardwareInfo(query) {
  return request({
    url: '/produce/product-hardware-info/list',
    method: 'get',
    params: query
  })
}

// 查询产品硬件详情详细
export function getProductHardwareInfo(id) {
  return request({
    url: '/produce/product-hardware-info/' + id,
    method: 'get'
  })
}

// 新增产品硬件详情
export function addProductHardwareInfo(data) {
  return request({
    url: '/produce/product-hardware-info',
    method: 'post',
    data: data
  })
}

// 修改产品硬件详情
export function updateProductHardwareInfo(data) {
  return request({
    url: '/produce/product-hardware-info',
    method: 'put',
    data: data
  })
}

// 删除产品硬件详情
export function delProductHardwareInfo(id) {
  return request({
    url: '/produce/product-hardware-info/' + id,
    method: 'delete'
  })
}

// 逻辑删除产品硬件详情
export function removedProductHardwareInfo(id) {
  return request({
    url: '/produce/product-hardware-info/' + id,
    method: 'delete'
  })
}

// 查询所有产品硬件信息
export function getHardwareAll(query) {
  return request({
    url: '/produce/product-hardware-info/get-all',
    method: 'get',
    params: query
  })
}

// 根据产品型号获取硬件信息
export function getByProductCode(query) {
  return request({
    url: '/produce/product-hardware-info/get-by-product-code',
    method: 'get',
    params: query
  })
}